<?php

test();

function test(){
	PathInstanceTest::testGetParentDir();
}


class PathInstanceTest{
	public static function testGetParentDir(){
	PathInstance::getParentDir();
}
	
	
}
class PathInstance{
	
	public static function getParentDir(){
		//获得当前文件的上级目录绝对路径，例如:D:\aptana_workspace\MyPHP\instance
		$currentDir=dirname(__FILE__);
		//获得当前文件上级目录的上级目录的绝对路径：，例如：D:\aptana_workspace\MyPHP
		$preDir=dirname(dirname(__FILE__));
		echo '当前目录：'.$currentDir.',上一级目录：'.$preDir;
	}
}
?>